package psd.model.Prolog;

import org.eclipse.jdt.core.dom.ASTNode;

import psd.model.IConverter;
import psd.model.IConverterFactory;
import psd.model.Prolog.Converters.PrologAnnotationTypeDeclarationConverter;
import psd.model.Prolog.Converters.PrologAnnotationTypeMemberDeclarationConverter;
import psd.model.Prolog.Converters.PrologAnonymousClassDeclarationConverter;
import psd.model.Prolog.Converters.PrologArrayAccessConverter;
import psd.model.Prolog.Converters.PrologArrayCreationConverter;
import psd.model.Prolog.Converters.PrologArrayInitializerConverter;
import psd.model.Prolog.Converters.PrologAssertStatementConverter;
import psd.model.Prolog.Converters.PrologAssignmentConverter;
import psd.model.Prolog.Converters.PrologBlockConverter;
import psd.model.Prolog.Converters.PrologBooleanLiteralConverter;
import psd.model.Prolog.Converters.PrologBreakStatementConverter;
import psd.model.Prolog.Converters.PrologCastExpressionConverter;
import psd.model.Prolog.Converters.PrologCatchClauseConverter;
import psd.model.Prolog.Converters.PrologCharacterLiteralConverter;
import psd.model.Prolog.Converters.PrologClassInstanceCreationConverter;
import psd.model.Prolog.Converters.PrologCompilationUnitConverter;
import psd.model.Prolog.Converters.PrologConditionalExpressionConverter;
import psd.model.Prolog.Converters.PrologContinueStatementConverter;
import psd.model.Prolog.Converters.PrologEmptyStatementConverter;
import psd.model.Prolog.Converters.PrologEnhancedForStatementConverter;
import psd.model.Prolog.Converters.PrologEnumConstantDeclarationConverter;
import psd.model.Prolog.Converters.PrologEnumDeclarationConverter;
import psd.model.Prolog.Converters.PrologExpressionStatementConverter;
import psd.model.Prolog.Converters.PrologFieldAccessConverter;
import psd.model.Prolog.Converters.PrologFieldDeclarationConverter;
import psd.model.Prolog.Converters.PrologForStatementConverter;
import psd.model.Prolog.Converters.PrologIfStatementConverter;
import psd.model.Prolog.Converters.PrologImportDeclarationConverter;
import psd.model.Prolog.Converters.PrologInfixExpressionConverter;
import psd.model.Prolog.Converters.PrologInitializerConverter;
import psd.model.Prolog.Converters.PrologInstanceofExpressionConverter;
import psd.model.Prolog.Converters.PrologLabeledStatementConverter;
import psd.model.Prolog.Converters.PrologMarkerAnnotationConverter;
import psd.model.Prolog.Converters.PrologMemberValuePairConverter;
import psd.model.Prolog.Converters.PrologMethodDeclarationConverter;
import psd.model.Prolog.Converters.PrologMethodInvocationConverter;
import psd.model.Prolog.Converters.PrologNormalAnnotationConverter;
import psd.model.Prolog.Converters.PrologNullLiteralConverter;
import psd.model.Prolog.Converters.PrologNumberLiteralConverter;
import psd.model.Prolog.Converters.PrologPackageDeclarationConverter;
import psd.model.Prolog.Converters.PrologParameterizedTypeConverter;
import psd.model.Prolog.Converters.PrologParenthesizedExpressionConverter;
import psd.model.Prolog.Converters.PrologPostfixExpressionConverter;
import psd.model.Prolog.Converters.PrologPrefixExpressionConverter;
import psd.model.Prolog.Converters.PrologPrimitiveTypeConverter;
import psd.model.Prolog.Converters.PrologQualifiedNameConverter;
import psd.model.Prolog.Converters.PrologQualifiedTypeConverter;
import psd.model.Prolog.Converters.PrologReturnStatementConverter;
import psd.model.Prolog.Converters.PrologSimpleNameConverter;
import psd.model.Prolog.Converters.PrologSimpleTypeConverter;
import psd.model.Prolog.Converters.PrologSingleMemberAnnotationConverter;
import psd.model.Prolog.Converters.PrologSingleVariableDeclarationConverter;
import psd.model.Prolog.Converters.PrologStringLiteralConverter;
import psd.model.Prolog.Converters.PrologSuperConstructorInvocationConverter;
import psd.model.Prolog.Converters.PrologSuperFieldAccessConverter;
import psd.model.Prolog.Converters.PrologSuperMethodInvocationConverter;
import psd.model.Prolog.Converters.PrologSwitchCaseConverter;
import psd.model.Prolog.Converters.PrologSwitchStatementConverter;
import psd.model.Prolog.Converters.PrologSynchronizedStatementConverter;
import psd.model.Prolog.Converters.PrologThisExpressionConverter;
import psd.model.Prolog.Converters.PrologThrowStatementConverter;
import psd.model.Prolog.Converters.PrologTryStatementConverter;
import psd.model.Prolog.Converters.PrologTypeDeclarationConverter;
import psd.model.Prolog.Converters.PrologTypeDeclarationStatementConverter;
import psd.model.Prolog.Converters.PrologTypeLiteralConverter;
import psd.model.Prolog.Converters.PrologTypeParameterConverter;
import psd.model.Prolog.Converters.PrologVariableDeclarationExpressionConverter;
import psd.model.Prolog.Converters.PrologVariableDeclarationFragmentConverter;
import psd.model.Prolog.Converters.PrologVariableDeclarationStatementConverter;
import psd.model.Prolog.Converters.PrologWhileStatementConverter;
import psd.model.Prolog.Converters.PrologWildcardTypeConverter;


public class PrologConverterFactory implements IConverterFactory {

	private FactGenerationToolbox generationToolBox;

	public PrologConverterFactory(FactGenerationToolbox toolbox) {
		generationToolBox = toolbox;
	}

	@Override
	public IConverter GetConverter(int nodeType) {
		switch (nodeType) {
		case ASTNode.ANNOTATION_TYPE_DECLARATION:
			return new PrologAnnotationTypeDeclarationConverter(generationToolBox);
		case ASTNode.ANONYMOUS_CLASS_DECLARATION:
			return new PrologAnonymousClassDeclarationConverter(generationToolBox);
		case ASTNode.ANNOTATION_TYPE_MEMBER_DECLARATION:
			return new PrologAnnotationTypeMemberDeclarationConverter(generationToolBox);
		case ASTNode.ARRAY_ACCESS:
			return new PrologArrayAccessConverter(generationToolBox);
		case ASTNode.ARRAY_CREATION:
			return new PrologArrayCreationConverter(generationToolBox);
		case ASTNode.ARRAY_INITIALIZER:
			return new PrologArrayInitializerConverter(generationToolBox);
		case ASTNode.ARRAY_TYPE:
			return null;
		case ASTNode.ASSERT_STATEMENT:
			return new PrologAssertStatementConverter(generationToolBox);
		case ASTNode.ASSIGNMENT:
			return new PrologAssignmentConverter(generationToolBox);
		case ASTNode.BLOCK:
			return new PrologBlockConverter(generationToolBox);
		case ASTNode.BLOCK_COMMENT:
			return null;
		case ASTNode.BOOLEAN_LITERAL:
			return new PrologBooleanLiteralConverter(generationToolBox);
		case ASTNode.BREAK_STATEMENT:
			return new PrologBreakStatementConverter(generationToolBox);
		case ASTNode.CAST_EXPRESSION:
			return new PrologCastExpressionConverter(generationToolBox);
		case ASTNode.CATCH_CLAUSE:
			return new PrologCatchClauseConverter(generationToolBox);
		case ASTNode.CHARACTER_LITERAL:
			return new PrologCharacterLiteralConverter(generationToolBox);
		case ASTNode.CLASS_INSTANCE_CREATION:
			return new PrologClassInstanceCreationConverter(generationToolBox);
		case ASTNode.COMPILATION_UNIT:
			return new PrologCompilationUnitConverter(generationToolBox);
		case ASTNode.CONDITIONAL_EXPRESSION:
			return new PrologConditionalExpressionConverter(generationToolBox);
		case ASTNode.CONSTRUCTOR_INVOCATION:
			return null;
		case ASTNode.CONTINUE_STATEMENT:
			return new PrologContinueStatementConverter(generationToolBox);
		case ASTNode.EMPTY_STATEMENT:
			return new PrologEmptyStatementConverter(generationToolBox);
		case ASTNode.ENHANCED_FOR_STATEMENT:
			return new PrologEnhancedForStatementConverter(generationToolBox);
		case ASTNode.ENUM_CONSTANT_DECLARATION:
			return new PrologEnumConstantDeclarationConverter(generationToolBox);
		case ASTNode.ENUM_DECLARATION:
			return new PrologEnumDeclarationConverter(generationToolBox);
		case ASTNode.EXPRESSION_STATEMENT:
			return new PrologExpressionStatementConverter(generationToolBox);
		case ASTNode.FIELD_ACCESS:
			return new PrologFieldAccessConverter(generationToolBox);
		case ASTNode.FIELD_DECLARATION:
			return new PrologFieldDeclarationConverter(generationToolBox);
		case ASTNode.FOR_STATEMENT:
			return new PrologForStatementConverter(generationToolBox);
		case ASTNode.IF_STATEMENT:
			return new PrologIfStatementConverter(generationToolBox);
		case ASTNode.IMPORT_DECLARATION:
			return new PrologImportDeclarationConverter(generationToolBox);
		case ASTNode.INFIX_EXPRESSION:
			return new PrologInfixExpressionConverter(generationToolBox);
		case ASTNode.INITIALIZER:
			return new PrologInitializerConverter(generationToolBox);
		case ASTNode.INSTANCEOF_EXPRESSION:
			return new PrologInstanceofExpressionConverter(generationToolBox);
		case ASTNode.LABELED_STATEMENT:
			return new PrologLabeledStatementConverter(generationToolBox);
		case ASTNode.LINE_COMMENT:
			return null;
		case ASTNode.MARKER_ANNOTATION:
			return new PrologMarkerAnnotationConverter(generationToolBox);
		case ASTNode.MEMBER_REF:
			return null;
		case ASTNode.MEMBER_VALUE_PAIR:
			return new PrologMemberValuePairConverter(generationToolBox);
		case ASTNode.METHOD_REF:
			return null;
		case ASTNode.METHOD_REF_PARAMETER:
			return null;
		case ASTNode.METHOD_DECLARATION:
			return new PrologMethodDeclarationConverter(generationToolBox);
		case ASTNode.METHOD_INVOCATION:
			return new PrologMethodInvocationConverter(generationToolBox);
		case ASTNode.MODIFIER:
			return null;
		case ASTNode.NORMAL_ANNOTATION:
			return new PrologNormalAnnotationConverter(generationToolBox);
		case ASTNode.NULL_LITERAL:
			return new PrologNullLiteralConverter(generationToolBox);
		case ASTNode.NUMBER_LITERAL:
			return new PrologNumberLiteralConverter(generationToolBox);
		case ASTNode.PACKAGE_DECLARATION:
			return new PrologPackageDeclarationConverter(generationToolBox);
		case ASTNode.PARAMETERIZED_TYPE:
			return new PrologParameterizedTypeConverter(generationToolBox);
		case ASTNode.PARENTHESIZED_EXPRESSION:
			return new PrologParenthesizedExpressionConverter(generationToolBox);
		case ASTNode.PREFIX_EXPRESSION:
			return new PrologPrefixExpressionConverter(generationToolBox);
		case ASTNode.PRIMITIVE_TYPE:
			return new PrologPrimitiveTypeConverter(generationToolBox);
		case ASTNode.POSTFIX_EXPRESSION:
			return new PrologPostfixExpressionConverter(generationToolBox);
		case ASTNode.QUALIFIED_NAME:
			return new PrologQualifiedNameConverter(generationToolBox);
		case ASTNode.QUALIFIED_TYPE:
			return new PrologQualifiedTypeConverter(generationToolBox);
		case ASTNode.RETURN_STATEMENT:
			return new PrologReturnStatementConverter(generationToolBox);
		case ASTNode.SIMPLE_NAME:
			return new PrologSimpleNameConverter(generationToolBox);
		case ASTNode.SIMPLE_TYPE:
			return new PrologSimpleTypeConverter(generationToolBox);
		case ASTNode.SINGLE_MEMBER_ANNOTATION:
			return new PrologSingleMemberAnnotationConverter(generationToolBox);
		case ASTNode.SINGLE_VARIABLE_DECLARATION:
			return new PrologSingleVariableDeclarationConverter(generationToolBox);
		case ASTNode.STRING_LITERAL:
			return new PrologStringLiteralConverter(generationToolBox);
		case ASTNode.SUPER_CONSTRUCTOR_INVOCATION:
			return new PrologSuperConstructorInvocationConverter(generationToolBox);
		case ASTNode.SUPER_FIELD_ACCESS:
			return new PrologSuperFieldAccessConverter(generationToolBox);
		case ASTNode.SUPER_METHOD_INVOCATION:
			return new PrologSuperMethodInvocationConverter(generationToolBox);
		case ASTNode.SWITCH_CASE:
			return new PrologSwitchCaseConverter(generationToolBox);
		case ASTNode.SWITCH_STATEMENT:
			return new PrologSwitchStatementConverter(generationToolBox);
		case ASTNode.SYNCHRONIZED_STATEMENT:
			return new PrologSynchronizedStatementConverter(generationToolBox);
		case ASTNode.TAG_ELEMENT:
			return null;
		case ASTNode.TEXT_ELEMENT:
			return null;
		case ASTNode.THIS_EXPRESSION:
			return new PrologThisExpressionConverter(generationToolBox);
		case ASTNode.THROW_STATEMENT:
			return new PrologThrowStatementConverter(generationToolBox);
		case ASTNode.TRY_STATEMENT:
			return new PrologTryStatementConverter(generationToolBox);
		case ASTNode.TYPE_DECLARATION:
			return new PrologTypeDeclarationConverter(generationToolBox);
		case ASTNode.TYPE_DECLARATION_STATEMENT:
			return new PrologTypeDeclarationStatementConverter(generationToolBox);
		case ASTNode.TYPE_LITERAL:
			return new PrologTypeLiteralConverter(generationToolBox);
		case ASTNode.TYPE_PARAMETER:
			return new PrologTypeParameterConverter(generationToolBox);
		case ASTNode.VARIABLE_DECLARATION_EXPRESSION:
			return new PrologVariableDeclarationExpressionConverter(generationToolBox);
		case ASTNode.VARIABLE_DECLARATION_FRAGMENT:
			return new PrologVariableDeclarationFragmentConverter(generationToolBox);
		case ASTNode.VARIABLE_DECLARATION_STATEMENT:
			return new PrologVariableDeclarationStatementConverter(generationToolBox);
		case ASTNode.WHILE_STATEMENT:
			return new PrologWhileStatementConverter(generationToolBox);
		case ASTNode.WILDCARD_TYPE:
			return new PrologWildcardTypeConverter(generationToolBox);
		default:
			return null;
		}
	}

}
